package com.intellagric.common.pojo;

import java.io.Serializable;
import java.util.List;

/**
 * layui后台管理的响应数据类
 */
public class LayuiDataGridResult implements Serializable{

	private long count;
	private int code;
	private String msg;
	private List data;

	public static LayuiDataGridResult success() {
		LayuiDataGridResult result = new LayuiDataGridResult();
		result.setCode(0);
		result.setMsg("请求成功");
		return result;
	}

	public static LayuiDataGridResult fail() {
		LayuiDataGridResult result = new LayuiDataGridResult();
		result.setCode(100);
		result.setMsg("请求失败");
		return result;
	}

	public LayuiDataGridResult add(List dataList ,long count ) {
		this.setData(dataList);
		this.setCount(count);
		return this;
	}

	public long getCount() {
		return count;
	}

	public void setCount(long count) {
		this.count = count;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public List getData() {
		return data;
	}

	public void setData(List data) {
		this.data = data;
	}
}
